/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

/**
 * 可疑驿站地址审核
 */
import React, { useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import CommonTable from './components/CommonTable';
import { usePageTabsChange } from '@/utils/hooks/pageTabs';
import { Tabs } from 'antd';
import RedPoint from '@/components/_pages/red-point';

const SuspiciousInnCheck: React.FC = () => {
  const [show] = usePageTabsChange();
  const [activeKey, setActiveKey] = useState<string>('NoticePage');

  const handleTabChange = (current: string) => {
    setActiveKey(current);
  };

  const tabList = [
    {
      tab: <RedPoint type='0'>待审核</RedPoint>,
      key: 'check',
    },
    {
      tab: '黑名单',
      key: 'blackList',
    },
    {
      tab: '已通过',
      key: 'pass',
    },
  ];

  return (
    <PageContainer>
      <Tabs onChange={handleTabChange}>
        {tabList.map((item) => (
          <Tabs.TabPane key={item.key} tab={item.tab}>
            <CommonTable type={item.key} activeKey={activeKey} show={show} />
          </Tabs.TabPane>
        ))}
      </Tabs>
    </PageContainer>
  );
};

export default SuspiciousInnCheck;
